﻿#ifndef JOURNAL_H
#define JOURNAL_H

#include "common/baseeditor.h"
#include "support/sp_env.h"
#include "m_fhs.h"

namespace Ui {
class Journal;
}

class Journal : public BaseEditor
{
    Q_OBJECT

public:
    explicit Journal(QWidget *parent = 0);
    ~Journal();

    void updateView();
    void createMenu();
    void updateEventView(const QString &date);

    void showSearchBox(const QString &condition);
    bool addItem(const QString &label);
    void removeItem();

private slots:
    void on_listView_clicked(const QModelIndex &index);

    void on_btn_submit_clicked();

private:
    Ui::Journal *ui;

    QString type;
    QSqlQueryModel *dateModel;
};

#endif // JOURNAL_H
